{% extends '::base.html.twig' %}

{% block contactus_attributes %} class="active"{% endblock %}

{% block title %}{% trans %}Contact Us{% endtrans %}{% endblock %}

{% block body %}

<div class="row-fluid whiteWrapper">

    <div class="googleMap">
        <iframe  frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/?ie=UTF8&amp;ll=31.201533,29.901009&amp;spn=0.005075,0.010568&amp;t=m&amp;z=17&amp;output=embed"></iframe>
    </div>

    <form class="form-horizontal contactUs" action="{{ path('contact_us') }}" method="post">

        {% for flashMessage in app.session.flashbag.get('contactEmailSent') %}
        <div class="alert-success alert">
            <button type="button" class="close" data-dismiss="alert">&times;</button>
            {% trans %}Sent successfully{% endtrans %}.
        </div>
        {% endfor %}

        {% for formError in form.vars.errors %}
        <div class="alert-error alert">
            <button type="button" class="close" data-dismiss="alert">&times;</button>
            {{ formError.message }}
        </div>
        {% endfor %}

        <fieldset>
            <legend>{% trans %}Contact Us{% endtrans %}</legend>
            <hr class="smallHr" />

            <p class="clear">
                {% trans %}Contact us to book an appointment to discuss your career objectives, gain invaluable insight about your opportunities for admission to highly selective colleges, and learn a more about which of our services are best for you.{% endtrans %}
            </p>
            
            <div class="control-group">
                <label class="control-label">{% trans %}Name{% endtrans %} <span class="required">*</span></label>

                <div class="controls">
                    {{ form_widget(form.name, {'attr': {'class': 'input-xxlarge'} }) }}
                </div>
            </div>

            {% for formError in form.name.vars.errors %}
            <div class="control-group">
                <div class="alert-error alert">
                    <button type="button" class="close" data-dismiss="alert">&times;</button>
                    {{ formError.message }}
                </div>
            </div>
            {% endfor %}

            <div class="control-group">
                <label class="control-label">{% trans %}Email{% endtrans %} <span class="required">*</span></label>

                <div class="controls">
                    {{ form_widget(form.email, {'attr': {'class': 'input-xxlarge'} }) }}
                </div>
            </div>

            {% for formError in form.email.vars.errors %}
            <div class="control-group">
                <div class="alert-error alert">
                    <button type="button" class="close" data-dismiss="alert">&times;</button>
                    {{ formError.message }}
                </div>
            </div>
            {% endfor %}

            <div class="control-group">
                <label class="control-label">{% trans %}Subject{% endtrans %} <span class="required">*</span></label>
                <div class="controls">
                    {{ form_widget(form.subject, {'attr': {'class': 'input-xxlarge'} }) }}
                </div>
            </div>

            {% for formError in form.subject.vars.errors %}
            <div class="control-group">
                <div class="alert-error alert">
                    <button type="button" class="close" data-dismiss="alert">&times;</button>
                    {{ formError.message }}
                </div>
            </div>
            {% endfor %}

            <div class="control-group">
                <label class="control-label">{% trans %}Message{% endtrans %} <span class="required">*</span></label>
                <div class="controls">
                    {{ form_widget(form.message, {'attr': {'class': 'input-xxlarge'} }) }}
                </div>
            </div>

            {% for formError in form.message.vars.errors %}
            <div class="control-group">
                <div class="alert-error alert">
                    <button type="button" class="close" data-dismiss="alert">&times;</button>
                    {{ formError.message }}
                </div>
            </div>
            {% endfor %}

            <div class="control-group">
                <label class="control-label">&nbsp;</label>
                <div class="controls">
                    {{ form_rest(form) }}
                    <button class="btn blue submit" type="submit">{% trans %}Send Message{% endtrans %}</button>
                </div>
            </div>
        </fieldset>
    </form>
</div>
{% endblock %}